<%@ page language="java" import="java.util.*"   import="com.gxuwz.medical.vo.*" import="com.gxuwz.medical.domain.person.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String msg= (String)request.getAttribute("msg");
%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="/medical/css/pintuer.css">
<link rel="stylesheet" href="/medical/css/admin.css">
<script src="/medical/js/jquery-1.4.4.min.js"></script>
<script src="/medical/js/pintuer.js"></script>
<script src="/medical/js/my.js"></script>
<script>
$(function(){
	var message = "<%=msg%>";
	if (message!="null"){
		alert(message);
	}
	
	var pageright = new Array();
	pageright[0]='F020301';
	pageright[1]='F020302';
	pageright[2]='F020303';
	pageright[3]='F020304';
	autoShow(pageright);
});


//搜索
function changesearch(){	
	var fullname = document.getElementById("fullname").value;
	window.location.href="system/PayServlet?method=serch&fullname="+fullname;		
}

//单个删除
function del(idcard,familycode){
	if(confirm("您确定要删除吗?")){
		window.location.href="system/PersonServlet?method=del&idcard="+idcard+"&familycode="+familycode;
	}
}

</script>
</head>
<body>
<form method="post" action="" id="listform">
  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 内容列表</strong> <a href="" style="float:right; display:none;">添加字段</a></div>
    <div class="padding border-bottom">
      <ul class="search" style="padding-left:10px;">
        <li> <a name="F020302" class="button border-main icon-plus-square-o" href="page/pay/pay_set.jsp">设置本年度参合缴费标准</a> </li>
        <li name="F020303">
          <input type="text" placeholder="请输入户主姓名" name="fullname" class="input" style="width:250px; line-height:17px;display:inline-block" id="fullname"/>
          <a href="javascript:void(0)" class="button border-main icon-search" onclick="changesearch()" > 搜索</a></li>
      </ul>
    </div>
  
    <table name="F020304" class="table table-hover text-center">
      <tr>
       <th width="100" style="text-align:left; padding-left:20px;">序号</th>
        <th>医疗证号</th>
        <th>家庭编号</th>        
        <th>姓名</th>
        <th>性别</th>
        <th>出生日期</th>
        <th>民族</th>
        <th>工作单位</th> 
        <th>联系电话</th>
        <th width="310">操作</th>
      </tr>
      <volist name="list" id="vo">

    	<%	
    		
    		PageBean pageBean = new PageBean();
    		pageBean = (PageBean)request.getAttribute("pageBean");
    		List list = new ArrayList();
    		list = pageBean.getPageData();
    		if(!list.isEmpty()){
    			for(int i=0;i<list.size();i++){
    				Person person = new Person();
    				person=(Person)list.get(i);
    				%>
  		<tr>
  		<td style="text-align:left; padding-left:20px;"><input type="checkbox" name="id[]" value="" />
  		<%=i+1 %></td>
  		  <td><%=person.getYbcardno() %></td>
  		  <td><%=person.getFamily().getFamilycode() %></td>
          <td><%=person.getFullname() %></td>
          <td><%=person.getSex() %></td>
          <td><%=person.getBrithday() %></td>
          <td><%=person.getNation() %></td>
          <td><%=person.getWorkunit() %></td>
          <td><%=person.getTel() %></td>
          <td><div class="button-group">
          <a name="F020301" class="button border-main" href="<%=basePath%>system/PayServlet?method=gotopay&familycode=<%=person.getFamily().getFamilycode()%>"><span class="icon-edit"></span>开始缴费</a>
          </div></td>
        </tr>  				
    				<% 
    			}
    		}
    	 %>    
      
      <tr>
        <td colspan="8">
        <div class="pagelist">
        <span>当前页：<%=pageBean.getCurrentpage() %>,共<%=pageBean.getTotalPage() %>页</span>
        <%if(!pageBean.isFirst()) {%>
        <a href="/system/PersonServlet?page=1&method=list">首页</a> 
        <%} %>
        <%if(pageBean.isHasPrev()){ %>
         <a href="/system/PersonServlet?page=<%=pageBean.getCurrentpage()-1%>&method=list">上一页</a> 
        <%}%>
          <%if(pageBean.isHasNext()){ %>
          <a href="/system/PersonServlet?page=<%=pageBean.getCurrentpage()+1%>&method=list">下一页</a>
         <%}%>
        
         <%if(!pageBean.isLast()) {%>
         <a href="/system/PersonServlet?page=<%=pageBean.getTotalPage()%>&method=list">尾页</a> 
         <%} %> 
         </div>
         </td>
      </tr>
    </table>
  </div>
</form>

</body>
</html>